From eaba2cd46852d5f331f22f4272afb5bcc6645870 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 4 Feb 2011 21:08:41 -0500 Subject: [PATCH] XI2: translate group state back into core state This is necessary to make the key event translation work as expected. https://bugzilla.gnome.org/show_bug.cgi?id=641367 --- gdk/x11/gdkdevice-xi2.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c index a3700de757..4b718102ba 100644 --- a/gdk/x11/gdkdevice-xi2.c +++ b/gdk/x11/gdkdevice-xi2.c @@ -728,5 +728,17 @@ _gdk_x11_device_xi2_translate_state (XIModifierState *mods_state, } } + if (group_state) + { + gint group; + + group = group_state->base + group_state->latched + group_state->locked; + + /* FIXME: do we need the XKB complications for this ? */ + group = CLAMP(group, 0, 3); + + state |= group << 13; + } + return state; } -- 2.30.2